/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package edu.upn.sigemfi.vfi.beans;

import edu.upn.sigemfi.vfi.bc.TranFinancieraDelegate;
import edu.upn.sigemfi.vfi.be.TranFinanciera;
import java.util.List;

/**
 *
 * @author Programador
 */
public class TranFinancieraController {
private TranFinancieraDelegate delegado;
    private TranFinanciera tranFinanciera;

    public TranFinancieraController() {
        delegado = new TranFinancieraDelegate();
    }

    public List<TranFinanciera> getTranFinancieraes() {
        try {
            return delegado.listar();
        } catch (Exception e) {
            e.printStackTrace();
        }
        return null;
    }
    public String nuevo() {
        tranFinanciera = new TranFinanciera();
        return "nuevo";
    }
    public String registrar() {
        try {
            delegado.crear(tranFinanciera);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return "volver";
    }

    public TranFinanciera getTranFinanciera() {
        return tranFinanciera;
    }
    public void setTranFinanciera(TranFinanciera tranFinanciera) {
        this.tranFinanciera = tranFinanciera;
    }
}
